#pragma once
#include "precompiled.h"

class Scenery;
class MyEndOfStepListener;

class Physics_Scenery
{
public:
	Physics_Scenery(void);
	~Physics_Scenery(void);

	// Create the character as a physical Havok object.
	void Create( hkpWorld* world, Scenery *s );

	// Remove this object fromt the system.
	void Cleanup( hkpWorld* world );

	// Initialize the static scenery listener for ends of physics steps.
	static void CreateListener_EndOfStep();

	// Load the environment from file into the world.
	void Load_Create_Environment( std::string path, hkpWorld* world );

	// Get any input for and step this Havok object through the simulation.
	void Update( hkReal const &timeStep, std::vector<hkUint32>* frustum_ids );

	// Get.
	hkUint32 const &getUID() const;
	Scenery* getScenery();
	hkpRigidBody* getRigidBody();

	// Set.
	void setDoFlash();

private:

	hkQsTransform createFullTransform();

	hkpRigidBody *rb;
	Scenery* ptr_scenery;

	hkReal timeElapsed;

	// Create a listener that can be shared by all the scenery.
	static MyEndOfStepListener* m_listener;
};

inline hkUint32 const &Physics_Scenery::getUID() const{
	return rb->m_uid;
}
